package egg_drop;

import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.URL;
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.imageio.ImageIO;

public class ObEgg {
    
    public static long timeBetweenEggs = Framework.secInNanosec * 5;
    
    public static long lastEggTime = 0;   
    
    public int x;
    
    public int y;    
   
    private int speed;
   
    private BufferedImage eggImg;      
    
    public ObEgg(int x, int y, int speed, BufferedImage eggImg)
    {
        this.x = x;
        this.y = y;
        
        this.speed = speed;
        
        this.eggImg = eggImg;        
    }
    
    public void Update()
    {
        y += speed;
    }
    
    public void Draw(Graphics2D g2d)
    {
        g2d.drawImage(eggImg, x, y, null);
    }
}
